home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 322 / flex / scan.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-20  |  24.6 KB  |  669 lines

  1. #define YY_DEFAULT_ACTION YY_FATAL_ERROR( "flex scanner jammed" );
  2. #define FLEX_USE_ECS
  3. #define FLEX_USE_MECS
  4. /* A lexical scanner generated by flex */
  5.  
  6. #ifdef atarist
  7. #include "flexskdf.h"
  8. #else
  9. #include "flexskeldef.h"
  10. #endif
  11.  
  12. # line 1 "scan.l"
  13. #define INITIAL 0
  14. /* scan.l - scanner for flex input */
  15. /*
  16.  * Copyright (c) 1987, the University of California
  17.  * 
  18.  * The United States Government has rights in this work pursuant to
  19.  * contract no. DE-AC03-76SF00098 between the United States Department of
  20.  * Energy and the University of California.
  21.  * 
  22.  * This program may be redistributed.  Enhancements and derivative works
  23.  * may be created provided the new works, if made available to the general
  24.  * public, are made available for use by anyone.
  25.  */
  26. # line 16 "scan.l"
  27. #include "flexdef.h"
  28. #include "parse.h"
  29.  
  30. #define ACTION_ECHO fprintf( temp_action_file, "%s", yytext )
  31. #define MARK_END_OF_PROLOG fprintf( temp_action_file, "%%%% end of prolog\n" );
  32.  
  33. #undef YY_DECL
  34. #define YY_DECL \
  35.     int flexscan()
  36.  
  37. #define RETURNCHAR \
  38.     yylval = yytext[0]; \
  39.     return ( CHAR );
  40.  
  41. #define RETURNNAME \
  42.     (void) strcpy( nmstr, yytext ); \
  43.     return ( NAME );
  44.  
  45. #define PUT_BACK_STRING(str, start) \
  46.     for ( i = strlen( str ) - 1; i >= start; --i ) \
  47.         unput(str[i])
  48. #define SECT2 2
  49. #define SECT2PROLOG 4
  50. #define SECT3 6
  51. #define CODEBLOCK 8
  52. #define PICKUPDEF 10
  53. #define SC 12
  54. #define CARETISBOL 14
  55. #define NUM 16
  56. #define QUOTE 18
  57. #define FIRSTCCL 20
  58. #define CCL 22
  59. #define ACTION 24
  60. #define RECOVER 26
  61. #define BRACEERROR 28
  62. #define C_COMMENT 30
  63. #define C_COMMENT_2 32
  64. #define ACTION_COMMENT 34
  65. #define ACTION_STRING 36
  66. #define PERCENT_BRACE_ACTION 38
  67. # line 53 "scan.l"
  68. #define YY_JAM 228
  69. #define YY_JAM_BASE 823
  70. #define YY_TEMPLATE 229
  71. static char __l[229] =
  72.     {   0,
  73.        -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,
  74.        -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,
  75.        -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,
  76.        -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,
  77.        14,    7,   13,   11,    7,   12,   14,   14,   14,   10,
  78.        46,   39,   40,   32,   46,   45,   30,   46,   46,   46,
  79.        39,   28,   46,   45,   31,    0,   27,   99,    0,   21,
  80.         0,   23,   22,   24,   22,   52,   48,   49,   51,   53,
  81.        67,   68,   65,   64,   66,   54,   56,   55,   54,   60,
  82.        59,   60,   60,   62,   62,   62,   63,   76,   80,   79,
  83.  
  84.        81,   81,   74,   75,    0,   25,   70,   69,   17,   19,
  85.        18,   89,   91,   90,   83,   85,   84,   92,   94,   95,
  86.        96,   72,   72,   73,   72,    7,   11,    0,    7,    1,
  87.         0,    2,    0,    8,    4,    5,    0,    3,   10,   39,
  88.        40,    0,    0,   35,    0,    0,   97,   97,    0,   34,
  89.        33,   34,    0,   39,   28,    0,    0,    0,   42,   38,
  90.        26,    0,   23,   22,   50,   51,   64,   98,   98,    0,
  91.        57,   58,   61,   76,    0,   78,    0,   77,   15,   87,
  92.        83,   82,   92,   93,   71,    1,    0,    9,    8,    0,
  93.         0,    6,   36,    0,   37,   43,    0,    0,   97,   34,
  94.  
  95.        34,   44,   29,    0,   36,    0,   29,    0,   42,    0,
  96.        20,   98,    0,   16,    0,   88,   71,    0,    0,   97,
  97.        98,    0,    0,   97,   98,    4,    0,    0
  98.     } ;
  99.  
  100. static char __e[128] =
  101.     {   0,
  102.         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  103.         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
  104.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  105.         1,    2,    1,    5,    6,    7,    8,    1,    9,   10,
  106.        10,   11,   10,   12,   13,   10,   14,   15,   16,   16,
  107.        16,   16,   16,   16,   16,   16,   16,    1,    1,   17,
  108.         1,   18,   10,    1,   24,   23,   23,   23,   23,   23,
  109.        23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
  110.        23,   25,   26,   27,   23,   23,   23,   28,   23,   23,
  111.        19,   20,   21,   22,   23,    1,   24,   23,   23,   23,
  112.  
  113.        23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
  114.        23,   23,   23,   25,   26,   27,   23,   23,   23,   28,
  115.        23,   23,   29,   30,   31,    1,    1
  116.     } ;
  117.  
  118. static char __m[32] =
  119.     {   0,
  120.         1,    2,    3,    1,    4,    1,    1,    1,    5,    1,
  121.         6,    1,    1,    5,    7,    7,    1,    1,    1,    8,
  122.         9,    1,    7,    7,    7,    7,    7,    7,    5,    1,
  123.        10
  124.     } ;
  125.  
  126. static short int __b[277] =
  127.     {   0,
  128.         0,   27,   55,   85,  311,  309,    0,    0,  308,    2,
  129.         4,    9,   96,  113,  288,  287,  139,  168,   12,   16,
  130.        24,   25,   77,   81,  197,  226,  305,  303,   11,   17,
  131.        89,   92,   93,  102,  106,  107,  123,  124,  144,  154,
  132.       823,   14,  823,    0,  130,  823,  302,  137,  293,    0,
  133.       823,  256,  823,  823,   37,  823,  823,  274,  138,  272,
  134.       299,  823,  285,  281,  823,  288,    0,  823,  287,  823,
  135.       146,    0,  157,  823,  165,  823,  823,  267,    0,  823,
  136.       823,  823,  823,   96,  823,  823,  823,  823,  153,  823,
  137.       823,  157,  272,  823,    0,  159,  823,    0,  823,  823,
  138.  
  139.       167,  273,  823,  823,  280,  823,  823,  823,  175,  823,
  140.       268,  179,  823,  267,    0,  823,  266,    0,  823,  823,
  141.         0,  276,  189,  823,  170,  192,    0,  275,  201,  823,
  142.       274,  823,  273,    0,  248,  823,  271,  823,    0,    0,
  143.       823,  242,  260,  823,   95,  192,  823,  173,    0,    0,
  144.       823,  315,  195,  345,  823,  205,  207,  209,    0,  823,
  145.       823,  253,    0,  213,  823,    0,  205,  823,  209,    0,
  146.       823,  823,  823,    0,  207,  823,    0,  823,  249,  243,
  147.         0,  823,    0,  823,    0,  823,  192,  823,    0,  161,
  148.       161,  823,  823,  147,  823,  823,  217,  114,  226,    0,
  149.  
  150.         0,  823,  823,  219,  233,  236,  823,  240,    0,  127,
  151.       823,  229,  103,  823,   88,  823,    0,   24,  233,  246,
  152.       250,   16,  252,  823,  823,  823,  249,  823,  375,  385,
  153.       395,  405,  415,  425,  435,  445,  455,  465,  475,  485,
  154.       495,  505,  515,  525,  535,   27,  545,  555,  565,   15,
  155.       575,  585,  595,  605,  615,  625,    2,  635,  645,  655,
  156.       665,  674,  684,  694,  704,  714,  724,  734,  744,  754,
  157.       763,  773,  783,  793,  803,  813
  158.     } ;
  159.  
  160. static short int __d[277] =
  161.     {   0,
  162.       229,  229,  228,    3,  230,  230,  231,  231,  232,  232,
  163.       233,  233,  234,  234,  228,  228,  235,  235,  236,  236,
  164.       237,  237,  238,  238,  239,  239,  240,  240,  228,  228,
  165.       241,  241,  242,  242,  243,  243,  244,  244,  245,  245,
  166.       228,  228,  228,  246,  247,  228,  248,  249,  228,  250,
  167.       228,  228,  228,  228,  228,  228,  228,  251,  252,  253,
  168.       254,  228,  228,  228,  228,  230,  255,  228,  232,  228,
  169.       232,  256,  228,  228,  256,  228,  228,  228,  257,  228,
  170.       228,  228,  228,  228,  228,  228,  228,  228,  252,  228,
  171.       228,  258,  259,  228,  260,  252,  228,  261,  228,  228,
  172.  
  173.       262,  228,  228,  228,  240,  228,  228,  228,  241,  228,
  174.       228,  242,  228,  228,  263,  228,  228,  264,  228,  228,
  175.       265,  245,  245,  228,  245,  228,  246,  247,  247,  228,
  176.       248,  228,  266,  267,  228,  228,  268,  228,  250,   52,
  177.       228,  228,  269,  228,  251,  251,  228,  228,  252,  270,
  178.       228,  270,  254,  254,  228,  254,  254,  271,  272,  228,
  179.       228,  273,  256,  256,  228,  257,  228,  228,  228,  258,
  180.       228,  228,  228,  261,  262,  228,  262,  228,  274,  275,
  181.       263,  228,  264,  228,  276,  228,  266,  228,  267,  228,
  182.       268,  228,  228,  269,  228,  228,  251,  251,  228,  270,
  183.  
  184.       152,  228,  228,  254,  254,  271,  228,  271,  272,  273,
  185.       228,  228,  274,  228,  275,  228,  276,  228,  251,  228,
  186.       228,  228,  251,  228,  228,  228,  251,-32767,  228,  228,
  187.       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
  188.       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
  189.       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
  190.       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
  191.       228,  228,  228,  228,  228,  228
  192.     } ;
  193.  
  194. static short int __n[855] =
  195.     {   0,
  196.       228,   42,   43,   42,   70,   73,   74,   75,  166,   71,
  197.        73,   74,   75,  107,   87,  126,   88,  126,   87,  107,
  198.        88,  139,   44,   44,   44,   44,   44,   44,   45,   46,
  199.        45,   89,   47,  127,   48,   89,   91,   91,  144,  144,
  200.        49,  108,  226,   92,   92,   93,   93,  108,  222,   50,
  201.        50,   50,   50,   50,   50,   51,   52,   53,   52,   54,
  202.        51,   55,   51,   51,   56,   56,   51,   51,   56,   51,
  203.        51,   57,   51,   58,   59,   51,   51,   51,   51,   51,
  204.        51,   51,   51,   60,   56,   51,   61,   62,   61,   95,
  205.       216,  110,   63,   95,  110,  113,   96,   97,   64,  111,
  206.  
  207.        96,   97,  111,  114,  113,  214,   65,   77,  116,  116,
  208.       167,  167,  114,   78,  146,  196,  117,  117,   79,   79,
  209.        79,   79,   79,   79,   77,  119,  119,  120,  120,  211,
  210.        78,  129,  130,  129,  145,   79,   79,   79,   79,   79,
  211.        79,   82,  121,  121,  134,  123,  124,  123,   70,  195,
  212.        83,  125,  148,   84,   84,  123,  124,  123,   73,  149,
  213.        73,  125,  135,  192,  136,  137,  164,  148,  164,   85,
  214.        82,  169,  228,  148,  149,  176,  162,  228,  170,   83,
  215.       149,  228,   84,   84,  218,  228,  177,  199,  199,  228,
  216.       123,  228,  123,  126,  188,  126,  125,  203,   85,   99,
  217.  
  218.       185,  100,  129,  130,  129,  101,  197,  203,  204,  203,
  219.       102,  207,  145,  198,  164,  176,  164,  160,  204,  167,
  220.       167,  203,  208,  212,  212,  103,  177,  104,   99,  228,
  221.       100,  219,  219,  205,  101,  203,  146,  196,  207,  102,
  222.       220,  220,  207,  221,  221,  216,  204,  223,  223,  208,
  223.       194,  214,  146,  196,  103,  211,  104,  140,  141,  140,
  224.       224,  224,  195,  142,  225,  225,  227,  227,  146,  196,
  225.       193,  146,  196,  192,  190,  188,  132,  186,  228,  182,
  226.       180,  179,  106,  178,  172,  143,  151,  151,  165,   70,
  227.        67,  160,  159,  146,  152,  152,  152,  152,  152,  152,
  228.  
  229.       154,  155,  154,  138,  132,  106,  156,  106,   80,   80,
  230.        70,   67,  157,   67,  228,  228,  228,  228,  228,  228,
  231.       228,  228,  228,  228,  228,  228,  228,  228,  158,  201,
  232.       201,  228,  228,  228,  228,  228,  228,  201,  201,  201,
  233.       201,  201,  201,  228,  228,  202,  154,  155,  154,  228,
  234.       228,  228,  156,  228,  228,  228,  228,  228,  157,  228,
  235.       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
  236.       228,  228,  228,  228,  158,   41,   41,   41,   41,   41,
  237.        41,   41,   41,   41,   41,   66,   66,   66,   66,   66,
  238.        66,   66,   66,   66,   66,   68,   68,   68,   68,   68,
  239.  
  240.        68,   68,   68,   68,   68,   69,   69,   69,   69,   69,
  241.        69,   69,   69,   69,   69,   72,   72,   72,   72,   72,
  242.        72,   72,   72,   72,   72,   76,   76,  228,   76,   76,
  243.        76,   76,   76,   76,   76,   81,   81,   81,   81,   81,
  244.        81,   81,   81,   81,   81,   86,   86,   86,   86,   86,
  245.        86,   86,   86,   86,   86,   90,   90,  228,   90,   90,
  246.        90,   90,   90,   90,   90,   94,   94,  228,   94,   94,
  247.        94,   94,   94,   94,   94,   98,   98,   98,   98,   98,
  248.        98,   98,   98,   98,   98,  105,  105,  105,  105,  105,
  249.       105,  105,  105,  105,  105,  109,  109,  109,  109,  109,
  250.  
  251.       109,  109,  109,  109,  109,  112,  112,  112,  112,  112,
  252.       112,  112,  112,  112,  112,  115,  115,  115,  115,  115,
  253.       115,  115,  115,  115,  115,  118,  118,  118,  118,  118,
  254.       118,  118,  118,  118,  118,  122,  122,  122,  122,  122,
  255.       122,  122,  122,  122,  122,  128,  128,  128,  128,  128,
  256.       128,  128,  128,  128,  128,  131,  131,  131,  131,  131,
  257.       131,  131,  131,  131,  131,  133,  133,  133,  133,  133,
  258.       133,  133,  133,  133,  133,  145,  145,  228,  145,  145,
  259.       145,  145,  145,  228,  145,  147,  147,  228,  147,  147,
  260.       147,  147,  147,  147,  147,  150,  150,  228,  150,  150,
  261.  
  262.       150,  150,  150,  150,  150,  153,  153,  153,  153,  153,
  263.       153,  153,  153,  153,  153,  161,  228,  228,  161,  161,
  264.       161,  161,  161,  161,  161,  163,  163,  228,  163,  163,
  265.       163,  163,  163,  163,  163,  168,  168,  228,  168,  168,
  266.       168,  168,  168,  168,  168,  171,  171,  228,  171,  171,
  267.       171,  171,  171,  171,  171,  173,  173,  228,  173,  173,
  268.       173,  173,  173,  228,  173,  174,  174,  228,  228,  228,
  269.       174,  174,  174,  174,  175,  175,  228,  175,  175,  175,
  270.       175,  175,  175,  175,  181,  181,  228,  181,  181,  228,
  271.       181,  181,  181,  181,  183,  183,  228,  228,  183,  183,
  272.  
  273.       183,  228,  183,  183,  184,  184,  228,  184,  184,  184,
  274.       184,  184,  184,  184,  187,  187,  187,  187,  187,  187,
  275.       187,  187,  187,  187,  189,  189,  228,  189,  189,  189,
  276.       189,  189,  189,  189,  191,  191,  191,  191,  191,  191,
  277.       191,  191,  191,  191,  194,  194,  194,  194,  194,  194,
  278.       194,  194,  194,  194,  200,  200,  228,  200,  200,  200,
  279.       200,  200,  200,  206,  206,  206,  206,  206,  206,  206,
  280.       206,  206,  206,  209,  209,  228,  209,  209,  209,  209,
  281.       209,  209,  209,  210,  210,  210,  210,  210,  210,  210,
  282.       210,  210,  210,  213,  213,  213,  213,  213,  213,  213,
  283.  
  284.       213,  213,  213,  215,  215,  215,  215,  215,  215,  215,
  285.       215,  215,  215,  217,  217,  228,  217,  217,  217,  217,
  286.       217,  217,  217,  228,  228,  228,  228,  228,  228,  228,
  287.       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
  288.       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
  289.       228,  228,  228,  228
  290.     } ;
  291.  
  292. static short int __c[855] =
  293.     {   0,
  294.         0,    1,    1,    1,   10,   11,   11,   11,  257,   10,
  295.        12,   12,   12,   29,   19,   42,   19,   42,   20,   30,
  296.        20,  250,    1,    1,    1,    1,    1,    1,    2,    2,
  297.         2,   19,    2,  246,    2,   20,   21,   22,   55,   55,
  298.         2,   29,  222,   21,   22,   21,   22,   30,  218,    2,
  299.         2,    2,    2,    2,    2,    3,    3,    3,    3,    3,
  300.         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
  301.         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
  302.         3,    3,    3,    3,    3,    3,    4,    4,    4,   23,
  303.       215,   31,    4,   24,   32,   33,   23,   23,    4,   31,
  304.  
  305.        24,   24,   32,   33,   34,  213,    4,   13,   35,   36,
  306.        84,   84,   34,   13,  145,  145,   35,   36,   13,   13,
  307.        13,   13,   13,   13,   14,   37,   38,   37,   38,  210,
  308.        14,   45,   45,   45,  198,   14,   14,   14,   14,   14,
  309.        14,   17,   37,   38,   48,   39,   39,   39,   71,  194,
  310.        17,   39,   59,   17,   17,   40,   40,   40,   73,   59,
  311.        73,   40,   48,  191,   48,   48,   75,   89,   75,   17,
  312.        18,   92,  125,   96,   89,  101,   71,  109,   92,   18,
  313.        96,  112,   18,   18,  190,  109,  101,  148,  148,  112,
  314.       123,  123,  123,  126,  187,  126,  123,  153,   18,   25,
  315.  
  316.       125,   25,  129,  129,  129,   25,  146,  156,  153,  157,
  317.        25,  158,  146,  146,  164,  175,  164,  157,  156,  167,
  318.       167,  204,  158,  169,  169,   25,  175,   25,   26,  204,
  319.        26,  197,  197,  156,   26,  205,  197,  197,  206,   26,
  320.       199,  199,  208,  212,  212,  180,  205,  219,  219,  206,
  321.       208,  179,  219,  219,   26,  162,   26,   52,   52,   52,
  322.       220,  220,  143,   52,  221,  221,  223,  223,  227,  227,
  323.       142,  223,  223,  137,  135,  133,  131,  128,  122,  117,
  324.       114,  111,  105,  102,   93,   52,   60,   60,   78,   69,
  325.        66,   64,   63,   58,   60,   60,   60,   60,   60,   60,
  326.  
  327.        61,   61,   61,   49,   47,   28,   61,   27,   16,   15,
  328.         9,    6,   61,    5,    0,    0,    0,    0,    0,    0,
  329.         0,    0,    0,    0,    0,    0,    0,    0,   61,  152,
  330.       152,    0,    0,    0,    0,    0,    0,  152,  152,  152,
  331.       152,  152,  152,    0,    0,  152,  154,  154,  154,    0,
  332.         0,    0,  154,    0,    0,    0,    0,    0,  154,    0,
  333.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  334.         0,    0,    0,    0,  154,  229,  229,  229,  229,  229,
  335.       229,  229,  229,  229,  229,  230,  230,  230,  230,  230,
  336.       230,  230,  230,  230,  230,  231,  231,  231,  231,  231,
  337.  
  338.       231,  231,  231,  231,  231,  232,  232,  232,  232,  232,
  339.       232,  232,  232,  232,  232,  233,  233,  233,  233,  233,
  340.       233,  233,  233,  233,  233,  234,  234,    0,  234,  234,
  341.       234,  234,  234,  234,  234,  235,  235,  235,  235,  235,
  342.       235,  235,  235,  235,  235,  236,  236,  236,  236,  236,
  343.       236,  236,  236,  236,  236,  237,  237,    0,  237,  237,
  344.       237,  237,  237,  237,  237,  238,  238,    0,  238,  238,
  345.       238,  238,  238,  238,  238,  239,  239,  239,  239,  239,
  346.       239,  239,  239,  239,  239,  240,  240,  240,  240,  240,
  347.       240,  240,  240,  240,  240,  241,  241,  241,  241,  241,
  348.  
  349.       241,  241,  241,  241,  241,  242,  242,  242,  242,  242,
  350.       242,  242,  242,  242,  242,  243,  243,  243,  243,  243,
  351.       243,  243,  243,  243,  243,  244,  244,  244,  244,  244,
  352.       244,  244,  244,  244,  244,  245,  245,  245,  245,  245,
  353.       245,  245,  245,  245,  245,  247,  247,  247,  247,  247,
  354.       247,  247,  247,  247,  247,  248,  248,  248,  248,  248,
  355.       248,  248,  248,  248,  248,  249,  249,  249,  249,  249,
  356.       249,  249,  249,  249,  249,  251,  251,    0,  251,  251,
  357.       251,  251,  251,    0,  251,  252,  252,    0,  252,  252,
  358.       252,  252,  252,  252,  252,  253,  253,    0,  253,  253,
  359.  
  360.       253,  253,  253,  253,  253,  254,  254,  254,  254,  254,
  361.       254,  254,  254,  254,  254,  255,    0,    0,  255,  255,
  362.       255,  255,  255,  255,  255,  256,  256,    0,  256,  256,
  363.       256,  256,  256,  256,  256,  258,  258,    0,  258,  258,
  364.       258,  258,  258,  258,  258,  259,  259,    0,  259,  259,
  365.       259,  259,  259,  259,  259,  260,  260,    0,  260,  260,
  366.       260,  260,  260,    0,  260,  261,  261,    0,    0,    0,
  367.       261,  261,  261,  261,  262,  262,    0,  262,  262,  262,
  368.       262,  262,  262,  262,  263,  263,    0,  263,  263,    0,
  369.       263,  263,  263,  263,  264,  264,    0,    0,  264,  264,
  370.  
  371.       264,    0,  264,  264,  265,  265,    0,  265,  265,  265,
  372.       265,  265,  265,  265,  266,  266,  266,  266,  266,  266,
  373.       266,  266,  266,  266,  267,  267,    0,  267,  267,  267,
  374.       267,  267,  267,  267,  268,  268,  268,  268,  268,  268,
  375.       268,  268,  268,  268,  269,  269,  269,  269,  269,  269,
  376.       269,  269,  269,  269,  270,  270,    0,  270,  270,  270,
  377.       270,  270,  270,  271,  271,  271,  271,  271,  271,  271,
  378.       271,  271,  271,  272,  272,    0,  272,  272,  272,  272,
  379.       272,  272,  272,  273,  273,  273,  273,  273,  273,  273,
  380.       273,  273,  273,  274,  274,  274,  274,  274,  274,  274,
  381.  
  382.       274,  274,  274,  275,  275,  275,  275,  275,  275,  275,
  383.       275,  275,  275,  276,  276,    0,  276,  276,  276,  276,
  384.       276,  276,  276,  228,  228,  228,  228,  228,  228,  228,
  385.       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
  386.       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
  387.       228,  228,  228,  228
  388.     } ;
  389.  
  390.  
  391. /* these declarations have to come after the section 1 code or lint gets
  392.  * confused about whether the variables are used
  393.  */
  394. #ifdef atarist
  395. FILE * yyin, * yyout;    /* init'ed in main */
  396. #else
  397. FILE *yyin = stdin, *yyout = stdout;
  398. #endif
  399.  
  400. /* these variables are all declared out here so that section 3 code can
  401.  * manipulate them
  402.  */
  403. static int yy_start, yy_b_buf_p, yy_c_buf_p, yy_e_buf_p;
  404. static int yy_saw_eof, yy_init = 1;
  405.  
  406. /* yy_ch_buf has to be 1 character longer than YY_BUF_SIZE, since when
  407.  * setting up yytext we can try to put a '\0' just past the end of the
  408.  * matched text
  409.  */
  410. static char yy_ch_buf[YY_BUF_SIZE + 1];
  411. static int yy_st_buf[YY_BUF_SIZE];
  412. static char yy_hold_char;
  413. char *yytext;
  414. static int yyleng;
  415.  
  416. YY_DECL
  417.     {
  418.     int yy_n_chars, yy_lp, yy_iii, yy_buf_pos, yy_act;
  419.  
  420.  
  421.     static int bracelevel, didadef;
  422.     int i, cclval;
  423.     char nmdef[MAXLINE], myesc();
  424.  
  425.  
  426.     if ( yy_init )
  427.     {
  428.     YY_INIT;
  429.     yy_start = 1;
  430.     yy_init = 0;
  431.     }
  432.  
  433.     goto get_next_token;
  434.  
  435. do_action:
  436.     for ( ; ; )
  437.     {
  438.     YY_DO_BEFORE_ACTION
  439.  
  440. #ifdef FLEX_DEBUG
  441.     fprintf( stderr, "--accepting rule #%d\n", yy_act );
  442. #endif
  443.     switch ( yy_act )
  444.         {
  445. case 1:
  446. # line 58 "scan.l"
  447. ++linenum; ECHO; /* indented code */
  448.     YY_BREAK
  449. case 2:
  450. # line 59 "scan.l"
  451. ++linenum; ECHO; /* treat as a comment */
  452.     YY_BREAK
  453. case 3:
  454. # line 60 "scan.l"
  455. ECHO; BEGIN(C_COMMENT);
  456.     YY_BREAK
  457. case 4:
  458. # line 61 "scan.l"
  459. return ( SCDECL );
  460.     YY_BREAK
  461. case 5:
  462. # line 62 "scan.l"
  463. return ( XSCDECL );
  464.     YY_BREAK
  465. case 6:
  466. # line 63 "scan.l"
  467. ++linenum; line_directive_out( stdout ); BEGIN(CODEBLOCK);
  468.     YY_BREAK
  469. case 7:
  470. # line 64 "scan.l"
  471. return ( WHITESPACE );
  472.     YY_BREAK
  473. case 8:
  474. # line 66 "scan.l"
  475. {
  476.             sectnum = 2;
  477.             line_directive_out( stdout );
  478.             BEGIN(SECT2PROLOG);
  479.             return ( SECTEND );
  480.             }
  481.     YY_BREAK
  482. case 9:
  483. # line 73 "scan.l"
  484. {
  485.             fprintf( stderr,
  486.                  "old-style lex command at line %d ignored:\n\t%s",
  487.                  linenum, yytext );
  488.             ++linenum;
  489.             }
  490.     YY_BREAK
  491. case 10:
  492. # line 80 "scan.l"
  493. {
  494.             (void) strcpy( nmstr, yytext );
  495.             didadef = false;
  496.             BEGIN(PICKUPDEF);
  497.             }
  498.     YY_BREAK
  499. case 11:
  500. # line 86 "scan.l"
  501. RETURNNAME;
  502.     YY_BREAK
  503. case 12:
  504. # line 87 "scan.l"
  505. ++linenum; /* allows blank lines in section 1 */
  506.     YY_BREAK
  507. case 13:
  508. # line 88 "scan.l"
  509. ++linenum; return ( '\n' );
  510.     YY_BREAK
  511. case 14:
  512. # line 90 "scan.l"
  513. synerr( "illegal character" ); BEGIN(RECOVER);
  514.     YY_BREAK
  515. case 15:
  516. # line 93 "scan.l"
  517. ECHO; BEGIN(0);
  518.     YY_BREAK
  519. case 16:
  520. # line 94 "scan.l"
  521. ++linenum; ECHO; BEGIN(0);
  522.     YY_BREAK
  523. case 17:
  524. # line 95 "scan.l"
  525. ECHO;
  526.     YY_BREAK
  527. case 18:
  528. # line 96 "scan.l"
  529. ECHO;
  530.     YY_BREAK
  531. case 19:
  532. # line 97 "scan.l"
  533. ++linenum; ECHO;
  534.     YY_BREAK
  535. case 20:
  536. # line 99 "scan.l"
  537. ++linenum; BEGIN(0);
  538.     YY_BREAK
  539. case 21:
  540. # line 100 "scan.l"
  541. ++linenum; ECHO;
  542.     YY_BREAK
  543. case 22:
  544. # line 102 "scan.l"
  545. /* separates name and definition */
  546.     YY_BREAK
  547. case 23:
  548. # line 104 "scan.l"
  549. {
  550.             (void) strcpy( nmdef, yytext );
  551.  
  552.             for ( i = strlen( nmdef ) - 1;
  553.                   i >= 0 &&
  554.                   nmdef[i] == ' ' || nmdef[i] == '\t';
  555.                   --i )
  556.                 ;
  557.  
  558.             nmdef[i + 1] = '\0';
  559.  
  560.                         ndinstal( nmstr, nmdef );
  561.             didadef = true;
  562.             }
  563.     YY_BREAK
  564. case 24:
  565. # line 119 "scan.l"
  566. {
  567.             if ( ! didadef )
  568.                 synerr( "incomplete name definition" );
  569.             BEGIN(0);
  570.             ++linenum;
  571.             }
  572.     YY_BREAK
  573. case 25:
  574. # line 126 "scan.l"
  575. ++linenum; BEGIN(0); RETURNNAME;
  576.     YY_BREAK
  577. case 26:
  578. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  579. yy_c_buf_p -= 1;
  580. YY_DO_BEFORE_ACTION; /* set up yytext again */
  581. # line 129 "scan.l"
  582. {
  583.             ++linenum;
  584.             ACTION_ECHO;
  585.             MARK_END_OF_PROLOG;
  586.             BEGIN(SECT2);
  587.             }
  588.     YY_BREAK
  589. case 27:
  590. # line 136 "scan.l"
  591. ++linenum; ACTION_ECHO;
  592.     YY_BREAK
  593. case 28:
  594. # line 138 "scan.l"
  595. ++linenum; /* allow blank lines in section 2 */
  596.     YY_BREAK
  597.     /* this horrible mess of a rule matches indented lines which
  598.      * do not contain "/*".  We need to make the distinction because
  599.      * otherwise this rule will be taken instead of the rule which
  600.      * matches the beginning of comments like this one
  601.      */
  602. case 29:
  603. # line 145 "scan.l"
  604. {
  605.             synerr( "indented code found outside of action" );
  606.             ++linenum;
  607.             }
  608.     YY_BREAK
  609. case 30:
  610. # line 150 "scan.l"
  611. BEGIN(SC); return ( '<' );
  612.     YY_BREAK
  613. case 31:
  614. # line 151 "scan.l"
  615. return ( '^' );
  616.     YY_BREAK
  617. case 32:
  618. # line 152 "scan.l"
  619. BEGIN(QUOTE); return ( '"' );
  620.     YY_BREAK
  621. case 33:
  622. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  623. yy_c_buf_p = yy_b_buf_p;
  624. YY_DO_BEFORE_ACTION; /* set up yytext again */
  625. # line 153 "scan.l"
  626. BEGIN(NUM); return ( '{' );
  627.     YY_BREAK
  628. case 34:
  629. # line 154 "scan.l"
  630. BEGIN(BRACEERROR);
  631.     YY_BREAK
  632. case 35:
  633. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  634. yy_c_buf_p = yy_b_buf_p;
  635. YY_DO_BEFORE_ACTION; /* set up yytext again */
  636. # line 155 "scan.l"
  637. return ( '$' );
  638.     YY_BREAK
  639. case 36:
  640. # line 157 "scan.l"
  641. {
  642.             bracelevel = 1;
  643.             BEGIN(PERCENT_BRACE_ACTION);
  644.             return ( '\n' );
  645.             }
  646.     YY_BREAK
  647. case 37:
  648. # line 162 "scan.l"
  649. ++linenum; return ( '\n' );
  650.     YY_BREAK
  651. case 38:
  652. # line 164 "scan.l"
  653. ACTION_ECHO; BEGIN(C_COMMENT_2);
  654.     YY_BREAK
  655. case 39:
  656. # line 166 "scan.l"
  657. { /* needs to be separate from following rule due to
  658.                * bug with trailing context
  659.                */
  660.             bracelevel = 0;
  661.             BEGIN(ACTION);
  662.             return ( '\n' );
  663.             }
  664.     YY_BREAK
  665. case 40:
  666. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  667. yy_c_buf_p -= 1;
  668. YY_DO_BEFORE_ACTION; /* set up yy
  669.